//package org.jeecg.modules.deepseek.config;
//
//import org.springframework.ai.embedding.EmbeddingModel;
//import org.springframework.ai.embedding.TokenCountBatchingStrategy;
//import org.springframework.ai.openai.OpenAiEmbeddingModel;
//import org.springframework.ai.openai.api.OpenAiApi;
//import org.springframework.ai.vectorstore.VectorStore;
//import org.springframework.ai.vectorstore.neo4j.Neo4jVectorStore;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import java.sql.Driver;
//@Configuration
//public class Neo4jConfig {
//    @Bean
//    public Driver driver() {
//        return GraphDatabase.driver("neo4j://<host>:<bolt-port>",
//                AuthTokens.basic("<username>", "<password>"));
//    }
//
//    @Bean
//    public
//    VectorStore vectorStore(Driver driver, EmbeddingModel embeddingModel) {
//        return Neo4jVectorStore.builder(driver, embeddingModel)
//                .databaseName("neo4j")                // Optional: defaults to "neo4j"
//                .distanceType(Neo4jVectorStore.Neo4jDistanceType.COSINE) // Optional: defaults to COSINE
//                .dimensions(1536)                      // Optional: defaults to 1536
//                .label("Document")                     // Optional: defaults to "Document"
//                .embeddingProperty("embedding")        // Optional: defaults to "embedding"
//                .indexName("custom-index")             // Optional: defaults to "spring-ai-document-index"
//                .initializeSchema(true)                // Optional: defaults to false
//                .batchingStrategy(new TokenCountBatchingStrategy()) // Optional: defaults to TokenCountBatchingStrategy
//                .build();
//    }
//
//    // This can be any EmbeddingModel implementation
//    @Bean
//    public EmbeddingModel embeddingModel() {
//        return new OpenAiEmbeddingModel(new OpenAiApi(System.getenv("OPENAI_API_KEY")));
//    }
//}
